package java17demo;

import java.util.List;
// import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamToListDemo {
    public static void main(String[] args) {
        Stream<Integer> scoreStream = Stream.of(98, 97, 90);
        List<Integer> scoreList = scoreStream.toList();
        // Java 11中需要使用Collectors收集器
        // List<Integer> list = scoreStream.collect(Collectors.toList());
        
        for (Integer e : scoreList) {
			System.out.print(e+" ");
		}
    }
}